#pragma once
#include "../../mds_common.h"
#include "../../io_interface/protocol/ks_json.h"
class DataParse
{
public:
	//DataParse();
	//~DataParse();


	void parseRecvData(uint8_t* data, Mat& r_SrcImg, SupData& r_SupData);
	void mergeAlgResult(vector<TrackResult>track_obj_information, TrackResult &algResult);
	bool sendJsonDataFlow(uint &cnt, uint8_t* data, KsProtocol result, int &length);
private:
	uint32_t getlittle_endian_number(uchar* data);
	uint32_t getbig_endian_number(uchar* data);
	void IntStarToString(int int_startime, char* str_startime);
	uint getFrameInformation(uint8_t* data, int word_size, int bit_offset);
	int32_t getFrameInformation2(uint8_t * data, int word_size, int bit_offset);
	Mat geneImageFromSrcData(uint8_t* data, int img_width, int img_height);
	Mat getLonGridFromSrcData(uint8_t* data, int img_width, int img_height);
	Mat getLatGridFromSrcData(uint8_t* data, int img_width, int img_height);

	void ProcessGFA(uint8_t* data, SupData& src_data, Mat& src_image);
	void ProcessGFB(uint8_t* data, SupData& src_data, Mat& src_image);
	void ProcessDGPA(uint8_t* data, Mat& src_image_);
	void ProcessDGPB(uint8_t* data, Mat& src_image_);
	void ProcessSJ_20(uint8_t* data, SupData& src_data, Mat& src_image);
	void set_data_number(uchar *data, unsigned int data_number);



};
